import com.bit.UserService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @Author: wenjingyuan
 * @Date: 2023/07/16/17:00
 * @Description:
 */
public class App {
    public static  void main(String[] args) {
        //.得到spring上下文对象
        ApplicationContext context=new ClassPathXmlApplicationContext("spring-config.xml");
        //得到bean
        UserService userService= (UserService) context.getBean("user");
        //3.使用bean
        userService.init();
    }
}
